<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js"></script>
</head>
<script >
    $.ajax({
        type:'post',
        url:'http://localhost:8080/getUser',
        data:{
            "userName":"libai",
            "age":23
        },
        dataType:'json',
        success:function (data) {
            console.log(data)
        },
        error:function (err) {
            console.log(err)
        }

    })
</script>
<body>

</body>
</html>